import request from '@/utils/request'

// 查询物料档案列表
export function listRecord(query) {
  return request({
    url: '/material/record/list',
    method: 'get',
    params: query
  })
}

// 查询物料档案详细
export function getRecord(productNumber) {
  return request({
    url: '/material/record/' + productNumber,
    method: 'get'
  })
}

// 新增物料档案
export function addRecord(data) {
  return request({
    url: '/material/record',
    method: 'post',
    data: data
  })
}

// 修改物料档案
export function updateRecord(data) {
  return request({
    url: '/material/record',
    method: 'put',
    data: data
  })
}

// 删除物料档案
export function delRecord(productNumber) {
  return request({
    url: '/material/record/' + productNumber,
    method: 'delete'
  })
}
